import { request } from '@/utils/request'

//投料计划详情
export function loadFeedPlanDetail(data, callBack) {
    return request({
        url: "/feed_plan/detail",
        method: 'get',
        data,
        isYarn: true,
        isId: true,
    }, callBack);
}

//原料详情
export function loadMaterialBatchDetail(data, callBack) {
    return request({
        url: "/raw_material_batch/detail",
        method: 'get',
        data,
        isYarn: true,
        isId: true,
    }, callBack);
}

//粗纱详情
export function loadThickYarnBatchDetail(data, callBack) {
    return request({
        url: "/thick_yarn/detail",
        method: 'get',
        data,
        isYarn: true,
        isId: true,
    }, callBack);
}

//粗纱包详情
export function loadThickYarnPackDetail(data, callback) {
    return request({
        url: "/thick_yarn/pack_detail",
        method: 'get',
        data,
        isYarn: true,
    }, callback);
}

//原料区域库存
export function loadMaterialAreaStockData(data, callBack) {
    return request({
        url: "/raw_material_batch_store_area/list_by_batch",
        method: 'get',
        data,
        isYarn: true,
    }, callBack);
}

//粗纱区域库存
export function loadThickYarnAreaStockData(data, callBack) {
    return request({
        url: "/thick_yarn/area_stock_by_batch",
        method: 'get',
        data,
        isYarn: true,
    }, callBack);
}

//投料领料
export function out4FeedPick(data, callback) {
    return request({
        url: '/feed_usage/out_4_feed_pick',
        method: 'post',
        data,
        isYarn: true,
        type: 'json'
    }, callback);
}

//领料列表
export function loadUsage4FeedPickData(data, callBack) {
    return request({
        url: "/feed_usage/list_4_feed_pick",
        method: 'get',
        data,
        isYarn: true,
    }, callBack);
}

//删除投料领料
export function delOut4FeedPick(data, callback) {
    return request({
        url: '/feed_usage/del_out_4_feed_pick',
        method: 'post',
        data,
        isYarn: true,
        type: 'json'
    }, callback);
}

//原料确认出库
export function materialCheckOut(data, callback) {
    return request({
        url: "/raw_material_batch/check_out",
        method: 'post',
        data,
        isYarn: true,
        isFile: true,
        isEmpty: true
    }, callback);
}

//粗纱确认出库
export function thickYarnCheckOut(data, callback) {
    return request({
        url: "/thick_yarn/check_out",
        method: 'post',
        data,
        isYarn: true,
        isFile: true,
        isEmpty: true
    }, callback);
}

//用料详情
export function loadFeedUsageDetail(data, callBack) {
    return request({
        url: "/feed_usage/detail",
        method: 'get',
        data,
        isYarn: true,
        isId: true
    }, callBack);
}

//增加原料批次
export function addMaterialBatch(data, callback) {
    return request({
        url: "/raw_material_batch/add_batch",
        method: 'post',
        data,
        isYarn: true,
        isFile: true,
    }, callback);
}

//用料列表 按计划
export function loadUsageByPlan(data, callBack) {
    return request({
        url: "/feed_usage/list_by_plan",
        method: 'get',
        data,
        isYarn: true,
    }, callBack);
}